package com.ckm.datasource;

import com.ckm.context.DynamicMongoContextHolder;
import org.springframework.data.mongodb.core.MongoTemplate;

public class DynamicMongoTemplate extends AbstractRoutingMongoSource{
    @Override
    protected Object determineCurrentLookupKey() {
        return DynamicMongoContextHolder.getMongoContext();
    }

    public MongoTemplate getMongoTemplate(){
        return determineMongoTemplate();
    }
}
